var load = function()
{
    var l = TPNode;
    for(var n=0,lg=l.length;n<lg;n++)
    {
        cElement(l[n],$("ptalk"));
    }
    return true;
}

window.onmousedown = function(e){
if(GH == null) return;
if(Now == false) EAOutDown(e);
else Now = false;
}
window.onmouseup = function(e){
   MGH = null; 
}
window.onmousemove = function(e){
    if(MGH == null) return;
    if(MGH.down = false) return;
    var mPos = getMousePos(e);
    var xdv = mPos.x - MGH.mouse.x;
    var ydv = mPos.y - MGH.mouse.y;
    var l = MGH.pos.x + xdv;
    var t = MGH.pos.y + ydv;
    MGH.obj.style.cssText ="left:"+l+"px;top:"+t+"px";
    TALKBOXNUM -=1;
}
/*
window.onmouseup = function(e){
    if(ptSelection() != '')
    {
        SELECTION = __E(e);
        alert(SELECTION.innerHTML);
    }
}
*/
var SELECTION = null;
var GH = null;
var PF = []; //frame now index
var PTFF = null;
var EA = function(id,isEvent){
    GH = id;
    Now = isEvent;
}
var TALKBOXNUM = 0;
var msgBtn = null;
var EDITER = null;
var IMG = false;
var MGH = null;
var Now = false;
var DownPass = false;
var FNP = '_pt_tab_';
var URL = "http://luren.com/";
var PINGTIME = 5000;
var NOWTALKBOX = null;
var IE = isIe();
var FF = isFF();
window.onkeydown = function(e){return keyDown(e);}
//window.onbeforeunload=function(e){return e.returnValue="你确定要离开PageTalk?";};
if(load())
{
    var A = new Ajax();
    setTimeout(PTPing,2000);
}
if(UData.home) var fsrc = UData.home;
else var fsrc = "./default.html"
EA_onload_home(fsrc);
if(UData.show) $('showImg').src=UData.show;else $('showImg').src = './images/h.png';
$('showImg').alt=UData.user;

